<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/12/31
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <base href="<%=basePath%>"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="<%=basePath%>static/css/pintuer.css">
    <link rel="stylesheet" href="<%=basePath%>static/css/admin.css">
    <script src="<%=basePath%>static/js/jquery.js"></script>
    <script src="<%=basePath%>static/js/pintuer.js"></script>
</head>
<body>
<form method="post" action="">
    <div class="panel admin-panel">
        <div class="panel-head"><strong class="icon-reorder"> 留言管理</strong></div>
        <div class="padding border-bottom">
            <ul class="search">
                <li>
                    <a  class="button border-green"  href="<%=basePath%>view/system/sysUser/addSysUser.jsp">增加</a>
                    <button type="button" class="button border-green" id="checkall"><span class="icon-check"></span> 全选
                    </button>
                    <button type="submit" class="button border-red"><span class="icon-trash-o"></span> 批量删除</button>
                </li>
            </ul>
        </div>
        <table class="table table-hover text-center">
            <tr>
                <th width="120">ID</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>电话</th>
                <th>地址</th>
                <th>邮件</th>
                <th>用户名</th>
                <th>密码</th>
                <th>操作</th>
            </tr>

            <c:forEach items="${sysUserList_db}" var="sysUser_db">
                <tr>
                    <td>${sysUser_db.userId}</td>
                    <td>${sysUser_db.name}</td>
                    <td>${sysUser_db.sex}</td>
                    <td>${sysUser_db.age}</td>
                    <td>${sysUser_db.tel}</td>
                    <td>${sysUser_db.address}</td>
                    <td>${sysUser_db.email}</td>
                    <td>${sysUser_db.username}</td>
                    <td>${sysUser_db.password}</td>
                    <td><a href="<%=basePath%>sysUserController/delete?userIdStr=${sysUser_db.userId}">删除</a>|
                    <a href="<%=basePath%>sysUserController/updateUI?userIdStr=${sysUser_db.userId}">修改</a>|
                    <a href="<%=basePath%>sysRoleController/FPRoleUI?userIdStr=${sysUser_db.userId}">分配角色</a></td>
                </tr>
            </c:forEach>

            <tr>
                <td colspan="8">
                    <div class="pagelist"><a href="">上一页</a> <span class="current">1</span><a href="">2</a><a
                            href="">3</a><a href="">下一页</a><a href="">尾页</a></div>
                </td>
            </tr>
        </table>
    </div>
</form>
<script type="text/javascript">

function del(id){
	if(confirm("您确定要删除吗?")){

	}
}

$("#checkall").click(function(){
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

function DelSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {
		Checkbox=true;
	  }
	});
	if (Checkbox){
		var t=confirm("您确认要删除选中的内容吗？");
		if (t==false) return false;
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}


</script>
</body>
</html>